package com.lanswon.icc.admin.controller;


import com.lanswon.icc.common.core.vo.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class ttt {


    @GetMapping("/1")
    @PreAuthorize("hasAuthority('test-1')")
    public Result<String> findByUsername(){

        return new  Result<String>(200,"成功","访问方法1");

    }


    @GetMapping("/2")
    @PreAuthorize("hasAuthority('test-2')")
    public Result<String> findByUsername1(){
        return new  Result<String>(200,"成功","访问方法2");

    }
}
